﻿@model IEnumerable<MvcApplication4.Models.tb_Funcionario>

@{
    ViewBag.Title = "Funcionários Cadastrados";
}

<h2>Funcionários Cadastrados</h2>

<p>
    @Html.ActionLink("Cadastrar Funcionário", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.Label("ID")
        </th>
        <th>
            @Html.Label("UBS")
        </th>
        <th>
            @Html.Label("Funcionário")
        </th>
        <th>
            @Html.Label("CPF")
        </th>
        <th>
            @Html.Label("Login")
        </th>
      @*  <th>
            @Html.DisplayNameFor(model => model.Senha)
        </th> *@
        <th>
            @Html.Label("Telefone")
        </th>
        <th>
            @Html.Label("Email")
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ID_Funcionario)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.tb_UBS.Nome_UBS)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nome_Funcionario)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CPF)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Login_Fun)
        </td>
        @* <td>
            @Html.DisplayFor(modelItem => item.Senha)
        </td> *@
        <td>
            @Html.DisplayFor(modelItem => item.Telefone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new {  id=item.ID_Funcionario }) |
            @Html.ActionLink("Deletar", "Delete", new {  id=item.ID_Funcionario })
        </td>
    </tr>
}

</table>
